import React, {PureComponent, Fragment} from 'react'
import {HomeWrapper, HomeLeft, HomeRight} from './style.js'
import RemmendCollect from './components/remmend-collect'
// import ContentList from './components/content-list'
import Board from './components/board'
// import Title from './components/title'
import { connect } from 'react-redux'
import ImgList from './components/img-list'
import { actionCreater } from './store'
import { BackTop } from 'antd'
import Footer from './components/footer'
import Header from '../../common/header'
import ContentList from '../../common/contentList'
import TitleList from '../../common/titleList'
import Qrcode from '../../common/qrcode'
// import BoardList from '../../common/boardList'
class Home extends PureComponent{
    
    componentDidMount(){
        this.props.changeHomeData()
        
    }
    
    render(){
        return(
            <Fragment>
            <Header></Header>
            <HomeWrapper>
              <HomeLeft>
                <ImgList></ImgList>
                <RemmendCollect></RemmendCollect>
                <ContentList></ContentList>
                <Footer></Footer>
              </HomeLeft>
              <HomeRight>
                <Board></Board>
                {/* <BoardList></BoardList> */}
                <Qrcode></Qrcode>
                <TitleList></TitleList>
                {/* <Title></Title> */}
              </HomeRight>
              {/* antd插件 */}
              <BackTop></BackTop>
            </HomeWrapper>
            </Fragment>
            
        )
        
    }
}
const mapDispatch = (dispatch) => ({
        changeHomeData(){
          dispatch(actionCreater.getHomeDate())
    }
})
export default connect(null, mapDispatch)(Home);
